/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * v_consulta.java
 *
 * Created on 11/04/2011, 12:34:11 AM
 */

package vista;

import controlador.c_consulta;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;


public class v_consulta extends javax.swing.JFrame {
 DefaultTableModel modelo_jtabla= new DefaultTableModel();
 c_consulta cconsulta = new c_consulta(this);
 Vector<String> titulo  = new Vector<String>();


    /** Creates new form v_consulta */
    public v_consulta() {
        initComponents();
        tabla_consulta.setModel(modelo_jtabla);
        titulo.add("Producto");
        titulo.add("cantidad");
        titulo.add("monto");



         button_ingredientes.addActionListener (cconsulta);
         button_ventas.addActionListener(cconsulta);

    }

    public JButton getButton_ingredientes() {
        return button_ingredientes;
    }

    public void setButton_ingredientes(JButton button_ingredientes) {
        this.button_ingredientes = button_ingredientes;
    }

    public JButton getButton_salir() {
        return button_salir;
    }

    public void setButton_salir(JButton button_salir) {
        this.button_salir = button_salir;
    }

    public JButton getButton_ventas() {
        return button_ventas;
    }

    public void setButton_ventas(JButton button_ventas) {
        this.button_ventas = button_ventas;
    }

    public c_consulta getCconsulta() {
        return cconsulta;
    }

    public void setCconsulta(c_consulta cconsulta) {
        this.cconsulta = cconsulta;
    }

    public DefaultTableModel getModelo_jtabla() {
        return modelo_jtabla;
    }

    public void setModelo_jtabla(DefaultTableModel modelo_jtabla) {
        this.modelo_jtabla = modelo_jtabla;
    }

    public JTable getTabla_consulta() {
        return tabla_consulta;
    }

    public void setTabla_consulta(JTable tabla_consulta) {
        this.tabla_consulta = tabla_consulta;
    }

    public Vector<String> getTitulo() {
        return titulo;
    }

    public void setTitulo(Vector<String> titulo) {
        this.titulo = titulo;
    }





    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        tabla_consulta = new javax.swing.JTable();
        button_ventas = new javax.swing.JButton();
        button_ingredientes = new javax.swing.JButton();
        button_salir = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        getContentPane().setLayout(null);

        tabla_consulta.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tabla_consulta);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(60, 152, 685, 410);

        button_ventas.setText("ventas");
        button_ventas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_ventasActionPerformed(evt);
            }
        });
        getContentPane().add(button_ventas);
        button_ventas.setBounds(660, 10, 120, 30);

        button_ingredientes.setText("ingredientes");
        button_ingredientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_ingredientesActionPerformed(evt);
            }
        });
        getContentPane().add(button_ingredientes);
        button_ingredientes.setBounds(660, 50, 120, 30);

        button_salir.setText("salir");
        button_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                button_salirActionPerformed(evt);
            }
        });
        getContentPane().add(button_salir);
        button_salir.setBounds(660, 90, 120, 30);

        jLabel1.setText("Consulta de comida rapida");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 220, 30);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-802)/2, (screenSize.height-630)/2, 802, 630);
    }// </editor-fold>//GEN-END:initComponents

    private void button_ventasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_ventasActionPerformed
        // TODO add your handling code here:

    }//GEN-LAST:event_button_ventasActionPerformed

    private void button_ingredientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_ingredientesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_button_ingredientesActionPerformed

    private void button_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_salirActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_button_salirActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new v_consulta().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton button_ingredientes;
    private javax.swing.JButton button_salir;
    private javax.swing.JButton button_ventas;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tabla_consulta;
    // End of variables declaration//GEN-END:variables

}
